package com.learnyou.server.xingzuo.dao.repository.service.impl;

import com.learnyou.server.xingzuo.dao.repository.entity.Device;
import com.learnyou.server.xingzuo.dao.repository.mapper.DeviceMapper;
import com.learnyou.server.xingzuo.dao.repository.service.IDeviceService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

/**
 * <p>
 * 宠物基本信息 服务实现类
 * </p>
 *
 * @author heweifeng
 * @since 2023-11-30
 */
@Service
public class DeviceServiceImpl extends ServiceImpl<DeviceMapper, Device> implements IDeviceService {

    @Override
    public Device findByDeviceNo(String deviceNo) {

        return lambdaQuery().eq(Device::getCode, deviceNo).last("limit 1").one();
    }
}
